Merge branch 'prod' of https://github.com/riligar/knowledge into prod #39
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 to GitHub Pages | |
| on: | |
| # Executa no push para a branch prod | |
| push: | |
| branches: [ "prod" ] | |
| # Permite execução manual do workflow | |
| workflow_dispatch: | |
| # Define permissões necessárias para o GITHUB_TOKEN | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Permite apenas um deploy simultâneo, cancelando execuções em andamento | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| # Job de build | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build project | |
| run: bun run build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Pasta onde os arquivos buildados são gerados | |
| path: ./dist | |
| # Job de deploy | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |