name: Build and Deploy Hugo on: pull_request: types: [closed] branches: - main jobs: build_and_deploy: if: github.event.pull_request.merged == true name: Deploy Hugo Website runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 with: submodules: recursive - name: Setup Hugo uses: peaceiris/actions-hugo@v2.6.0 with: hugo-version: "0.108.0" - name: Build site run: hugo - name: Deploy to S3 run: hugo deploy --force --maxDeletes -1 env: AWS_ACCESS_KEY_ID: ${{ secrets.SCW_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.SCW_SECRET_ACCESS_KEY }}