diff --git a/.github/workflows/deploy-dev-ghpages.yml b/.github/workflows/deploy-dev-ghpages.yml new file mode 100644 index 0000000..fc92ada --- /dev/null +++ b/.github/workflows/deploy-dev-ghpages.yml @@ -0,0 +1,65 @@ +name: deploy-dev-ghpages + +on: + push: + branches: ['main'] + workflow_dispatch: + +permissions: + contents: read + id-token: write + pages: write + +concurrency: + group: 'deploy-dev-ghpages' + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: setup nodejs + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: 'npm' + + - name: Setup Pages + uses: actions/configure-pages@v5 + with: + static_site_generator: nuxt + + - name: restore cache + uses: actions/cache@v4 + with: + path: | + dist + .nuxt + key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }} + restore-keys: | + ${{ runner.os }}-nuxt-build- + + - name: install dependencies + run: npm ci + + - name: generate static files + run: npm run generate + + - name: upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4