diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..0bcb4eb --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,55 @@ +name: 'Deploy static site' +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout your repository + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 10 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Build your Astro site + run: pnpm run build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + name: astro-build + + deploy: + name: Sevalla Deploy + runs-on: ubuntu-latest + needs: build + steps: + - name: Download build artifact + uses: actions/download-artifact@v4 + with: + name: astro-build + path: ./artifact + + - uses: sevalla-hosting/sevalla-deploy@v1.0.1 + with: + action: deploy-static-site + sevalla-token: ${{ secrets.SEVALLA_TOKEN }} + static-site-id: ${{ secrets.STATIC_SITE_ID }} + branch: main + wait-for-finish: true diff --git a/.github/workflows/sevalla-deploy.yml b/.github/workflows/sevalla-deploy.yml deleted file mode 100644 index 42c74ca..0000000 --- a/.github/workflows/sevalla-deploy.yml +++ /dev/null @@ -1,13 +0,0 @@ -on: [push] -jobs: - deploy-static-site: - runs-on: ubuntu-latest - steps: - - name: Sevalla Deploy - uses: sevalla-hosting/sevalla-deploy@v1.0.1 - with: - action: deploy-static-site - sevalla-token: ${{ secrets.SEVALLA_TOKEN }} - static-site-id: ${{ secrets.STATIC_SITE_ID }} - branch: main - wait-for-finish: true