Publish to Github pages #236
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: Publish to Github pages | |
on: | |
schedule: | |
- cron: '0 13 * * *' | |
push: | |
branches: [ staging ] | |
workflow_dispatch: | |
jobs: | |
buildAndDeploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
ref: staging | |
- name: Install and Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: 'latest' | |
extended: true | |
- name: Build site | |
run: hugo --enableGitInfo --minify --gc --logLevel info --baseURL https://monal-im.github.io/monal-im.org/site/ | |
- name: Deploy to Github Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
if: github.ref == 'refs/heads/staging' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
destination_dir: site | |
keep_files: false |