Skip to content

Commit

Permalink
fix: website workflow release build (#2101)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Aug 1, 2022
1 parent 4858b6a commit 3083a42
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ jobs:
with:
name: ${{ matrix.browser }}-${{ matrix.os }}-test-results
path: ${{ matrix.test_results_path }}
release:
changelog:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Release
name: Changelog
runs-on: ubuntu-latest
needs: check
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: tag-release
Expand All @@ -81,17 +80,35 @@ jobs:
release-type: node
monorepo-tags: true
package-name: website
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created
name: Release
runs-on: ubuntu-latest
needs:
- check
- test-e2e
- changelog
steps:
- uses: actions/checkout@v2
if: ${{ steps.tag-release.outputs.releases_created }}
- uses: actions/setup-node@v2
if: ${{ steps.tag-release.outputs.releases_created }}
with:
node-version: '16'
registry-url: https://registry.npmjs.org/
- uses: bahmutov/npm-install@v1
if: ${{ steps.tag-release.outputs.releases_created }}
- name: Run build
env:
NEXT_PUBLIC_MAGIC: ${{ secrets.NEXT_PUBLIC_MAGIC }}
NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}
NEXT_PUBLIC_COUNTLY_KEY: ${{ secrets.NEXT_PUBLIC_COUNTLY_KEY }}
NEXT_PUBLIC_COUNTLY_URL: ${{ secrets.NEXT_PUBLIC_COUNTLY_URL }}
NEXT_PUBLIC_ENV: production
NEXT_PUBLIC_API: https://api.nft.storage
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }}
SENTRY_ORG: protocol-labs-it
SENTRY_PROJECT: frontend
SENTRY_URL: https://sentry.io/
run: yarn build:website
- name: Website - Deploy
if: ${{ steps.tag-release.outputs.releases_created }}
run: npx wrangler pages publish --project-name nft-storage --branch main ./packages/website/out
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
Expand Down

0 comments on commit 3083a42

Please sign in to comment.