Use upgrade-insecure-requests CSP #18
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 website | |
on: | |
push: | |
branches: | |
- master | |
# Web manual trigger | |
workflow_dispatch: | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: false | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
HUGO_VERSION: 0.111.3 | |
steps: | |
- name: Install Hugo | |
run: | | |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \ | |
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
lfs: 'true' | |
- name: Build site | |
env: | |
HUGO_ENVIRONMENT: production | |
HUGO_ENV: production | |
run: | | |
hugo --gc | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./public | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |