-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infrastructure: Run builds with GitHub action workflow instead of scr…
…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
Showing
4 changed files
with
54 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.