fixed docs for ops util command (#51) #36
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: build | |
on: | |
push: | |
branches: | |
- main | |
env: | |
PUBLISH_DIRECTORY: public | |
permissions: | |
contents: write | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Checkout Production | |
if: github.ref_name == 'main' | |
uses: actions/checkout@v4 | |
with: | |
ref: asf-site | |
path: ${{ env.PUBLISH_DIRECTORY }} | |
- name: Prepare | |
working-directory: ${{ env.PUBLISH_DIRECTORY }} | |
run: | | |
rm -rf stylesheets | |
- name: Build Hugo site | |
run: | | |
npm install | |
npm run clean | |
npm run build:production | |
- name: Copy .asf.yaml to publish directory | |
run: cp .github/.asf.prod.yaml ${{ env.PUBLISH_DIRECTORY }}/.asf.yaml | |
- name: Copy .htaccess to publish directory | |
run: cp .github/.htaccess ${{ env.PUBLISH_DIRECTORY }}/.htaccess | |
- name: Deploy to ASF | |
working-directory: ${{ env.PUBLISH_DIRECTORY }} | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "ops+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Published changes from $GITHUB_SHA" | |
git push |