[fix] fix OpenFontRender.cpp #7
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: Generate and deploy documents | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
## コンテキスト | |
DOCUMENT_BRANCH: "gh-pages" | |
jobs: | |
build: | |
name: Generate document | |
permissions: | |
actions: write | |
checks: write | |
contents: write | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Set current datetime as env variable | |
env: | |
TZ: 'Asia/Tokyo' # Set timezone | |
run: echo "CURRENT_DATETIME=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set git-configs | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git config push.default current | |
- name: Load environment variables from .env file | |
run: | | |
for line in $(grep -v '^#' ./doxygen/.env.pages); do | |
echo $line >> $GITHUB_ENV | |
done | |
# - name: check env | |
# run: printenv | |
- name: Update submodules | |
run: git submodule update --init -- "jothepro/doxygen-awesome-css" | |
- name: Make document (run docker compose) | |
run: docker compose --env-file .env.pages up && docker compose down | |
working-directory: ./doxygen | |
- name: Run after process | |
run: docker run --rm --name ofr-doc-after -v $GITHUB_WORKSPACE:/usr/src/myapp -w /usr/src/myapp/doxygen python:3.9.16-bullseye python after_process.py $DOXYGEN_HTML_OUTPUT_DIR | |
- name: Change owner | |
run: | | |
sudo chown -R runner:docker ./$DOXYGEN_HTML_OUTPUT_DIR | |
sudo chown -R runner:docker ./xml | |
- name: Back directory | |
run: cp -r ./$DOXYGEN_HTML_OUTPUT_DIR ~/backup | |
- name: Switch branch | |
run: | # ブランチが無い場合は新規作成し、ある場合は切り替える | |
git switch ${{ env.DOCUMENT_BRANCH }} 2>/dev/null || git switch --orphan ${{ env.DOCUMENT_BRANCH }} | |
- name: Restore directory | |
run: cp -rf ~/backup/* ./$DOXYGEN_HTML_OUTPUT_DIR | |
- name: Commit and push | |
continue-on-error: true | |
run: | | |
git add $DOXYGEN_HTML_OUTPUT_DIR/ | |
git commit -m "$CURRENT_DATETIME" | |
git push | |
deploy: | |
name: Deploy pages | |
needs: build | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Load environment variables from .env file | |
run: | | |
for line in $(grep -v '^#' ./doxygen/.env.pages); do | |
echo $line >> $GITHUB_ENV | |
done | |
- name: Switch to document branch | |
run: git switch ${{ env.DOCUMENT_BRANCH }} | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
# - name: check env | |
# run: printenv | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
# Upload entire repository | |
path: ${{ env.DOXYGEN_HTML_OUTPUT_DIR }} | |
#path: "./testpages" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |