-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move CI to GitHub Actions * Drop --dryrun * Add html-proofer to gemfile
- Loading branch information
Brian J. Cardiff
authored
Dec 3, 2020
1 parent
37fa6fd
commit 850670d
Showing
7 changed files
with
169 additions
and
47 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,40 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
build: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download source | ||
uses: actions/checkout@v2 | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/bundle | ||
tmp/.htmlproofer | ||
key: gem-${{ hashFiles('Gemfile.lock') }} | ||
restore-keys: gem- | ||
- name: Build website | ||
run: | | ||
mv docker-compose.ci.yml docker-compose.override.yml | ||
docker-compose run --rm web /bin/bash -c "bundle check || bundle install --jobs=3" | ||
docker-compose run --rm web make check_html | ||
docker-compose run --rm web /bin/bash -c "make check_external_links || true" # allowed to fail | ||
- name: Configure AWS Credentials | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/unstable') | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
- name: Deploy to www.crystal-lang.org | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
run: | | ||
aws s3 sync ./_site s3://crystal-website --delete | ||
- name: Deploy to stg.crystal-lang.org | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/unstable' | ||
run: | | ||
aws s3 sync ./_site s3://stg.crystal-lang.org --delete |
This file was deleted.
Oops, something went wrong.
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 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 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 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,9 @@ | ||
version: '2' | ||
|
||
services: | ||
web: | ||
environment: | ||
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true | ||
volumes: | ||
- .:/src | ||
- ~/.cache/bundle:/usr/local/bundle |
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