Skip to content

GitHub Page Deploy #891

GitHub Page Deploy

GitHub Page Deploy #891

Workflow file for this run

name: GitHub Page Deploy
on:
schedule:
- cron: '0 9,15,18,22 * * *'
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.110.0'
extended: true
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('tools/**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Fetch organization
working-directory: tools/organization
run: go run github.com/echocat/echocat.org/tools/organization --output=../../site/data/organization.json --assets=../../site/assets/images/d "--githubAccessToken=${{ secrets.GITHUB_TOKEN }}" "--gitlabAccessToken=${{ secrets.GITLAB_TOKEN }}"
- name: Build page
working-directory: site
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site/public
keep_files: false
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'