-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config for Github Actions and Hugo deploy
- Loading branch information
1 parent
6fa0de6
commit 8921892
Showing
2 changed files
with
41 additions
and
2 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,35 @@ | ||
name: Build and deploy on Deuxfleurs infra | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: deploy-to-deuxfleurs | ||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
- name: Setup Hugo | ||
env: | ||
HUGO_VERSION: 0.124.1 | ||
HUGO_ENV: "production" | ||
run: | | ||
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz | ||
tar -xvzf hugo.tar.gz | ||
sudo mv hugo /usr/local/bin | ||
- name: Build Hugo | ||
env: | ||
HUGO_ENV: "production" | ||
run: | | ||
hugo version | ||
hugo -b ${{secrets.BASE_URL}} | ||
- name: Deploy to Deuxfleurs | ||
run: | | ||
touch ~/.awsrc | ||
echo "AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}}" >> ~/.awsrc | ||
echo "AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}}" >> ~/.awsrc | ||
source ~/.awsrc | ||
hugo deploy |
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