Use github actions

This commit is contained in:
Julien Bisconti 2020-03-15 10:06:38 +01:00
parent daa5b25321
commit 39ad8e978b
No known key found for this signature in database
GPG Key ID: 62772C6698F736CB
5 changed files with 8000 additions and 50 deletions

48
.github/main.workflow vendored
View File

@ -1,48 +0,0 @@
# workflow "New workflow" {
# on = "push"
# resolves = ["push changes"]
# }
# action "skip-commit" {
# uses = "veggiemonk/skip-commit@449e94fa83e7918c4079f37322205e17b868f993"
# env = {
# COMMIT_FILTER = "skip-ci"
# }
# }
# action "npm install" {
# uses = "actions/npm@de7a3705a9510ee12702e124482fad6af249991b"
# needs = ["skip-commit"]
# args = "install"
# }
# action "npm run build" {
# uses = "actions/npm@de7a3705a9510ee12702e124482fad6af249991b"
# needs = ["npm install"]
# args = "run build"
# }
# action "Build metadata" {
# needs = ["npm run build"]
# uses = "actions/npm@master"
# runs = "sh -l -c"
# args = ["node buildMetadata.js"]
# secrets = ["GITHUB_TOKEN"]
# env = {
# GIT_EMAIL = "alex.blaine@layder.io"
# GIT_USERNAME = "veggiemonk"
# }
# }
# action "push changes" {
# uses = "veggiemonk/bin/git@master"
# needs = ["Build metadata"]
# runs = "sh -c $@"
# args = "push.sh"
# secrets = ["GITHUB_TOKEN"]
# env = {
# GIT_EMAIL = "alex.blaine@layder.io"
# GIT_USERNAME = "veggiemonk-bot"
# GIT_USER = "veggiemonk"
# }
# }

33
.github/workflows/build.yaml.txt vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build site
on:
push:
branches:
- master
paths:
- '.github/workflows/build.yml'
- 'README.md'
jobs:
build_site:
runs-on: ubuntu-latest
name: Build site
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- uses: actions/setup-node@master
with:
node-version: '12.x'
- name: Determine npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Restore npm cache
uses: actions/cache@v1
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm run build

29
.github/workflows/check_links.yaml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Check links
on:
push:
paths:
- '.github/workflows/check_links.yml'
- 'README.md'
jobs:
check_links:
runs-on: ubuntu-latest
name: Check links
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
# - uses: actions/cache@v1
# with:
# path: vendor/bundle
# key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-gems-
- name: Awesome bot checking
run: |
gem install awesome_bot
awesome_bot README.md --white-list edit/master,sindresorhus/awesome,www.udacity.com,screwdriver.cd,veggiemonk/awesome-docker,vimeo.com,cycle.io,www.youtube.com

View File

@ -76,7 +76,9 @@ const bundle = () => {
})
.bundle()
.then(() => {
const smStream = new SitemapStream({ hostname: 'https://awesome-docker.netlify.com/' });
const smStream = new SitemapStream({
hostname: 'https://awesome-docker.netlify.com/',
});
smStream.write({
url: '/',
changefreq: 'daily',
@ -93,7 +95,7 @@ const bundle = () => {
fs.outputFile(
'dist/sitemap.xml',
// sm.createSitemap(sitemapOpts).toString(),
sm.toString()
sm.toString(),
),
);
};

7934
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff