diff --git a/.forgejo/workflows/main.yml b/.forgejo/workflows/main.yml index edb8289..d2b15c8 100644 --- a/.forgejo/workflows/main.yml +++ b/.forgejo/workflows/main.yml @@ -1,5 +1,5 @@ name: Build Astro -on: [push, pull_request, workflow_dispatch] +on: [push, workflow_dispatch] env: ASTRO_TELEMETRY_DISABLED: true @@ -18,37 +18,36 @@ jobs: - run: deno task install - run: deno task check - #deploy: - # name: 🚢 Deploy - # if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' - # runs-on: ubuntu-latest - # needs: [check] - # steps: - # - uses: actions/checkout@v4 - # - # - uses: denoland/setup-deno@v2 - # with: - # deno-version: v2.x - # - run: deno task install - # - run: deno task build - # - # - name: build containerfile - # id: build-image - # uses: redhat-actions/buildah-build@v2 - # with: - # image: website - # tags: latest - # containerfiles: | - # ./Containerfile - # - # - name: Push to registry - # uses: redhat-actions/push-to-registry@v2 - # with: - # image: ${{ steps.build-image.outputs.image }} - # tags: ${{ steps.build-image.outputs.tags }} - # username: ${{ secrets.REGISTRY_USER }} - # password: ${{ secrets.REGISTRY_PASSWORD }} - # registry: ${{ secrets.REGISTRY }} - # - # - name: Trigger deployment - # run: curl -X POST ${{ secrets.DEPLOY_WEBHOOK }} + deploy: + name: 🚢 Deploy + runs-on: docker + container: + image: node:lts + if: github.ref == 'refs/heads/main' + needs: [check] + steps: + - uses: https://github.com/actions/checkout@v4 + + - uses: https://github.com/denoland/setup-deno@v2 + with: + deno-version: v2.x + - run: deno task install + - run: deno task build + + - name: build containerfile + id: build-image + uses: https://github.com/redhat-actions/buildah-build@v2 + with: + image: website + tags: latest + containerfiles: | + ./Containerfile + + - name: Push to registry + uses: https://github.com/redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + username: token + password: ${{ secrets.GITHUB_TOKEN }} + registry: ${{ github.server_url }}/${{ github.repository }} diff --git a/package.json b/package.json index 20fb06d..7106ebc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@swablab/website", "private": true, "scripts": { - "install": "deno install", + "install": "deno install -q", "check": "astro check", "dev": "astro dev", "build": "astro build",