deploy site #200
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 site' | |
| on: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| # every Wednesday at 4:15 am | |
| - cron: 15 4 * * WED | |
| workflow_dispatch: {} | |
| jobs: | |
| build: | |
| name: build and deploy site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout... | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # setup environment: Hugo, JDK (needed for the documentation) and Node | |
| - name: Setup Hugo... | |
| uses: peaceiris/actions-hugo@v2 | |
| with: | |
| hugo-version: '0.92.2' | |
| - name: Set up JDK 17... | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Set up NodeJS 16... | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '16' | |
| # Build site | |
| - name: Build app... | |
| run: cd ./app && npm run build | |
| shell: bash | |
| - name: Build docs... | |
| run: ./build-asciidocs.sh 5.x 4.x | |
| shell: bash | |
| - name: Run Hugo... | |
| run: hugo | |
| # Deploy to the GitHub pages | |
| - name: Deploy... | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./public | |
| publish_branch: gh-pages |