diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..a4e064e --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,51 @@ +name: Deploy static content to Pages + +on: + push: + branches: ['main'] + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + - name: Install dependencies + run: pnpm install + - name: Write secret files + run: | + echo ${{ secrets.ENV }} > .env + echo ${{ secrets.SERVICE_ACCOUNT }} > service-account.json + - name: Build + run: pnpm run build + - name: Delete secrets + run: rm .env service-account.json + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/astro.config.mjs b/astro.config.mjs index 6b21de7..8016158 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,6 +6,7 @@ import Icons from 'unplugin-icons/vite' // https://astro.build/config export default defineConfig({ + base: '/real-o-mat/', output: 'static', integrations: [tailwind(), vue()], vite: {