Skip to content

Commit

Permalink
Infrastructure: Run builds with GitHub action workflow instead of scr…
Browse files Browse the repository at this point in the history
…ipts (pull #1500)

Removes 2 deploy scripts:
* scripts/travis-before_deploy.sh
* scripts/travis-deploy.sh

And replaces them with a GitHub actions work flow defined in `.github/workflows/deploy.yml`.

This deploy workflow can use a built-in GitHub authentication token so forks can utilize the build without setup.

Co-authored-by: Matt King <[email protected]>
  • Loading branch information
nschonni and mcking65 authored Aug 22, 2020
1 parent e8a984c commit 512408e
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 50 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy gh-pages

on:
push:
branches:
- master
paths:
- .github/workflows/deploy.yml
- common/**
- examples/**
- img/**
- aria-practices.html
- README.md

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: main

- uses: actions/checkout@v2
with:
path: deploy
ref: gh-pages

- name: Cleanup old files
run: |
rm -rf deploy/common/
rm -rf deploy/examples/
rm -rf deploy/img/
rm -rf deploy/index.html
rm -rf deploy/README.md
- name: Copy files
run: |
cp -R main/common deploy
cp -R main/examples deploy
cp -R main/img deploy
cp main/README.md deploy
- name: Generate new index
run: |
curl "https://labs.w3.org/spec-generator/?type=respec&url=https://raw.githack.com/${{ github.repository }}/${{ github.sha }}/aria-practices.html" -o deploy/index.html -f --retry 3
- name: Commit back
run: |
cd deploy
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git add --all
git commit -am "Generated by ${{ github.sha }}" || true
git push
12 changes: 0 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ git:
stages:
- Lint
- Test
- Deploy

jobs:
fast_finish: true
Expand Down Expand Up @@ -62,14 +61,3 @@ jobs:
- TEST_WAIT_TIME=1000
- CI_NODE_TOTAL=3
- CI_NODE_INDEX=2

- stage: Deploy
if: branch = master AND type != pull_request
script: skip
before_deploy: scripts/travis-before_deploy.sh
deploy:
provider: script
skip_cleanup: true
script: /tmp/deploy/travis-deploy.sh
on:
branch: master
24 changes: 0 additions & 24 deletions scripts/travis-before_deploy.sh

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/travis-deploy.sh

This file was deleted.

0 comments on commit 512408e

Please sign in to comment.