broken path #145
This file contains hidden or 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: Hugo pages | |
| on: | |
| push: | |
| branches: | |
| - main # Set a branch to deploy | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Web Repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: davidgs/DavidgsWeb | |
| fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
| path: ./DavidgsWeb | |
| # - name: Checkout Translate | |
| # uses: actions/checkout@v2 | |
| # with: | |
| # repository: davidgs/Translator | |
| # path: ./translate | |
| - name: cleanup | |
| run: mkdir /home/runner/work/DavidgsWeb/DavidgsWeb/public; chmod -R a+w /home/runner/work/DavidgsWeb/DavidgsWeb/public; ls -RAGl /home/runner/work/DavidgsWeb/DavidgsWeb/public; ls -RAGl /home/runner/work/DavidgsWeb/DavidgsWeb/public/ | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.154.5' | |
| extended: true | |
| - name: Build | |
| run: cd DavidgsWeb; hugo mod get; hugo mod npm pack; npm install; hugo --minify | |
| - name: rsync deployments | |
| uses: burnett01/rsync-deployments@7.0.1 | |
| with: | |
| switches: -avzr | |
| path: ./DavidgsWeb/public/ | |
| remote_path: ${{ secrets.REMOTE_PATH }} | |
| remote_host: ${{ secrets.SSH_HOST }} | |
| remote_port: ${{ secrets.SSH_PORT }} | |
| remote_user: ${{ secrets.SSH_USER }} | |
| remote_key: ${{ secrets.WEBSITE_DEPLOY_KEY }} | |
| remote_key_pass: ${{ secrets.DEPLOY_KEY_PASS }} |