Deploy Documents #1819
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 Documents" | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: TizenAPI/TizenFX-Docs | |
| ref: net8.0 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Install DocFX Tool | |
| run: dotnet tool install -g docfx --version 2.78.4 | |
| - name: Checkout TizenFX sources | |
| run: | | |
| ./build.sh clone | |
| - name: Cache DocFX output | |
| id: cache-site | |
| uses: actions/cache@v4 | |
| with: | |
| path: _site | |
| key: docfx-gh-pages-site-${{ hashFiles('repos/commits') }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Build Documents | |
| # if: steps.cache-site.outputs.cache-hit != 'true' | |
| run: | | |
| chmod +x ./build.sh | |
| ./build.sh restore | |
| ./build.sh build | |
| ./build.sh index | |
| # continue-on-error: true | |
| - name: Archive Artifacts | |
| run: | | |
| tar cfz site.tar.gz _site/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: documents | |
| path: site.tar.gz | |
| overwrite: true | |
| deploy: | |
| needs: [build] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: documents | |
| overwrite: true | |
| - name: Extract Artifacts | |
| run: | | |
| tar xfz site.tar.gz | |
| - name: Deploy GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./_site | |
| publish_branch: gh-pages | |
| user_name: 'TizenAPI-Bot' | |
| user_email: 'tizenapi@samsung.com' | |
| full_commit_message: 'Update documents' |