-
Notifications
You must be signed in to change notification settings - Fork 3
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
56e53d7
commit 016d942
Showing
3 changed files
with
56 additions
and
1 deletion.
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,44 @@ | ||
name: Build+deploy website | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths-ignore: | ||
- '.gitignore' | ||
- '.travis.yml' | ||
- 'README.md' | ||
- '*.sh' | ||
- '*.json' | ||
|
||
pull_request: | ||
branches: [master] | ||
types: [merged] | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
environment: 'TkkrLab website' | ||
steps: | ||
- name: Git Checkout (with submodules) | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: '0.111.3' | ||
extended: true | ||
|
||
- name: Build | ||
run: bash build.sh | ||
|
||
- name: Deploy with Rsync | ||
uses: SamKirkland/web-deploy@v1 | ||
with: | ||
source-path: './public/' | ||
target-server: ${{ vars.HOST }} | ||
ssh-port: ${{ vars.SSH_PORT }} | ||
remote-user: ${{ vars.SSH_USER }} | ||
private-ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
destination-path: ${{ vars.WEBROOT }} |
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,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -u | ||
|
||
git submodule update --init --recursive | ||
#npm install | ||
#cd themes/docsy | ||
#npm install | ||
#cd ../.. | ||
export HUGO_ENV="production" | ||
hugo --gc --minify |
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