Merge pull request #1 from ducfilan/main #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: my-pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build: | |
| name: Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v3 | |
| #with: | |
| # submodules: true # Fetch Hugo themes (true OR recursive) | |
| # fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: build | |
| run: yarn build | |
| - name: upload artifact | |
| uses: actions/upload-pages-artifact@v2 | |
| with: | |
| path: ./build | |
| 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@v2 |