Skip to content

Commit

Permalink
Use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
veggiemonk committed Mar 15, 2020
1 parent daa5b25 commit 39ad8e9
Show file tree
Hide file tree
Showing 5 changed files with 8,000 additions and 50 deletions.
48 changes: 0 additions & 48 deletions .github/main.workflow

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/build.yaml.txt
Original file line number Diff line number Diff line change
@@ -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 changes: 29 additions & 0 deletions .github/workflows/check_links.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -93,7 +95,7 @@ const bundle = () => {
fs.outputFile(
'dist/sitemap.xml',
// sm.createSitemap(sitemapOpts).toString(),
sm.toString()
sm.toString(),
),
);
};
Expand Down
Loading

0 comments on commit 39ad8e9

Please sign in to comment.