github pages deploy .. I hope #4
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_github_pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/deploy_github_pages.yml" | |
| - "make_ver/**" | |
| - "language_reference/**" | |
| - "static/langauge_reference.html" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@main | |
| - name: Build static files | |
| id: build | |
| run: make build_language_reference_docker | |
| - name: Organise `build` Folder | |
| id: organise | |
| run: | | |
| mkdir -p build/api/v1/ | |
| cp api/v1/language_reference.json build/api/v1/language_reference.json | |
| cp static/langauge_reference.html build/index.html | |
| - name: Upload static files as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@main | |
| with: | |
| path: build/ | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| id-token: write | |
| pages: write | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@main |