-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fe6b88
commit b7a4a7a
Showing
3 changed files
with
40 additions
and
27 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,39 @@ | ||
name: Hugo Build and Deploy | ||
|
||
on: push | ||
|
||
env: | ||
BASE_URL: ${{ (github.ref == 'refs/heads/master' && 'gen3.org') || 'alpha.gen3.org' }} | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: '0.100.2' | ||
extended: true | ||
|
||
- name: Setup Asciidoctor | ||
run: sudo apt-get install -y asciidoctor # support asciidoc files | ||
|
||
- name: Update Config (replace {BASE_URL}) | ||
run: sed -i "s|{BASE_URL}|${BASE_URL}|g" config.yaml | ||
|
||
- name: Build Site | ||
run: hugo | ||
|
||
- name: Install AWS CLI | ||
uses: chrislennon/[email protected] | ||
|
||
- name: Deploy to S3 | ||
run: | | ||
aws s3 cp public s3://${{ env.BASE_URL }}/ --recursive --region ${{ vars.AWS_REGION }} --acl public-read | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ themes_used | |
*.DS_Store | ||
./resources/ | ||
*/_gen/ | ||
.idea |
This file was deleted.
Oops, something went wrong.