Merge pull request #115 from pitastrudl/update_cd #53
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
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: 'Badge.team website' | |
steps: | |
- name: Git Checkout (with submodules) | |
uses: actions/[email protected] | |
with: | |
submodules: true | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: '0.124.1' | |
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 }} |