Skip to content

Commit

Permalink
Meta: migrate to GitHub Actions
Browse files Browse the repository at this point in the history
This takes advantage of the new CI build strategy in
whatwg/html-build#254.

Part of whatwg/meta#173.
  • Loading branch information
domenic committed Sep 24, 2020
1 parent 270640c commit 06aa3aa
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 20 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: build
run: |
docker run --rm --interactive --tty \
--mount "type=bind,source=.,destination=/whatwg/html,readonly=1" \
--env "HTML_SOURCE=/whatwg/html" \
--mount "type=bind,source=$GITHUB_WORKSPACE/output,destination=/whatwg/output" \
--env "HTML_OUTPUT=/whatwg/output" \
whatwg/html-build
- name: deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
SERVER: ${{ secrets.MARQUEE_SERVER }}
SERVER_PUBLIC_KEY: ${{ secrets.MARQUEE_PUBLIC_KEY }}
SERVER_DEPLOY_KEY: ${{ secrets.MARQUEE_DEPLOY_KEY }}
run: |
eval "$(ssh-agent -s)"
echo "$SERVER_DEPLOY_KEY" | ssh-add -
mkdir -p ~/.ssh/ && echo "$SERVER $SERVER_PUBLIC_KEY" > ~/.ssh/known_hosts
# Sync, including deletes, but ignoring the stuff we'll deploy below, so that we don't delete them.
echo "Deploying build output..."
# --chmod=D755,F644 means read-write for user, read-only for others.
rsync --archive --chmod=D755,F644 --compress --verbose \
--delete --exclude="commit-snapshots" --exclude="review-drafts" \
"$GITHUB_WORKSPACE/output/" "deploy@$SERVER:/var/www/html.spec.whatwg.org"
# Now sync a commit snapshot and a review draft, if any
echo ""
echo "Deploying Commit Snapshot and Review Drafts, if any..."
rsync --archive --chmod=D755,F644 --compress --verbose \
"$GITHUB_WORKSPACE/output/commit-snapshots" "$GITHUB_WORKSPACE/output/review-drafts" "deploy@$SERVER:/var/www/html.spec.whatwg.org"
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

0 comments on commit 06aa3aa

Please sign in to comment.