name: Website permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: true on: workflow_dispatch: {} jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 16 - name: Install pnpm uses: pnpm/action-setup@v2 with: version: 7 - name: Get pnpm store directory id: pnpm-cache run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - name: Setup pnpm cache uses: actions/cache@v3 with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - name: Install dependencies run: pnpm install - name: Build packages run: pnpm run dist - name: Build website run: ./node_modules/.bin/next build working-directory: iconoir.com env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Export website run: ./node_modules/.bin/next export working-directory: iconoir.com - name: Setup GitHub Pages uses: actions/configure-pages@v2 - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: path: './iconoir.com/out' deploy: name: Deploy runs-on: ubuntu-latest needs: build environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1