Deploy website #18
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: Deploy website | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 12 * * SUN" # Every Sunday at noon | |
workflow_dispatch: | |
concurrency: | |
group: pages | |
cancel-in-progress: true | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Hugo CLI | |
run: | | |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.124.1/hugo_extended_0.124.1_linux-amd64.deb \ | |
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | |
- name: Install Dart Sass Embedded # Installs dart-sass | |
run: sudo snap install dart-sass-embedded | |
- name: Install python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Build with Hugo | |
env: | |
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }} | |
run: | | |
git submodule update --init --recursive # fetch theme | |
make html | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./public | |
- name: Deploy pages | |
uses: actions/deploy-pages@v4 | |