Skip to content

fix: change domain to classic-app.nft.storage #2009

fix: change domain to classic-app.nft.storage

fix: change domain to classic-app.nft.storage #2009

Workflow file for this run

name: Website
on:
push:
branches:
- main
paths:
- 'packages/website/**'
- '.github/workflows/website.yml'
- 'yarn.lock'
pull_request:
paths:
- 'packages/website/**'
- '.github/workflows/website.yml'
- 'yarn.lock'
jobs:
check:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 18
- 20
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- uses: bahmutov/npm-install@v1
- name: Run build
env:
# Fake environment vars required for build
NEXT_PUBLIC_SENTRY_DSN: 'https://000000@0000000.ingest.sentry.io/00000'
NEXT_PUBLIC_ENV: dev
run: yarn build:website
- name: Run test
run: yarn test:website
test-e2e:
name: ${{ matrix.os }} (${{ matrix.browser }})
strategy:
fail-fast: false
matrix:
browser:
- firefox
- chromium
os:
- ubuntu-20.04
node-version:
- 18
- 20
test_results_path:
# corresponds to playwright invocation/configuration
- packages/website/test-results
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- uses: bahmutov/npm-install@v1
env:
DEBUG: pw:install
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npx playwright install --with-deps ${{ matrix.browser }} chromium
working-directory: packages/website
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn workspace website run test:e2e -- --project=${{ matrix.browser }}
- name: Check for website test results
id: check_website_test_results
uses: andstor/file-existence-action@v1
with:
files: ${{ matrix.test_results_path }}
- if: steps.check_website_test_results.outputs.files_exists == 'true'
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.browser }}-${{ matrix.os }}-test-results
path: ${{ matrix.test_results_path }}
changelog:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Changelog
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.tag-release.outputs.releases_created }}
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: tag-release
with:
path: packages/website
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
monorepo-tags: true
package-name: website
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Other Changes","hidden":false}]'
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
- uses: actions/setup-node@v2
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: bahmutov/npm-install@v1
- 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
NEXT_PUBLIC_NFT_PORT_API_KEY: ${{ secrets.NEXT_PUBLIC_NFT_PORT_API_KEY }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }}
SENTRY_ORG: protocol-labs-it
SENTRY_PROJECT: frontend
SENTRY_URL: https://sentry.io/
NEXT_PUBLIC_BLOG_URL: https://blog.nft.storage
run: yarn build:website
- name: Website - Deploy
run: npx wrangler pages publish --project-name nft-storage --branch main ./packages/website/out
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT }}