GOMOD Build CI #972
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: GOMOD Build CI | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: "20 22 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.x | |
- run: go version | |
- name: Install GOMOD | |
run: go install go.x2ox.com/sorbifolia/gomod/[email protected] | |
- name: Build | |
run: gomod -f data.json | |
- name: Add public resource | |
run: | | |
cp -r public/* go.x2ox.com | |
- name: Install Sitemap Generator | |
run: go install go.x2ox.com/sorbifolia/sitemap/[email protected] | |
- name: Generate Sitemap | |
run: | | |
sitemap-generator -f sitemap.config.json | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: go.x2ox.com | |
cname: go.x2ox.com | |
keep_files: true | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' |