Skip to content

Commit

Permalink
Create website.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan authored Nov 9, 2022
1 parent 249c97a commit ee991b9
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: website

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
deployment:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
nodeVersion: 18
packageManager: yarn
workingDirectory: website

- uses: the-guild-org/shared-config/website-cf@main
name: build and deploy website
env:
NEXT_BASE_PATH: ${{ github.ref == 'refs/heads/master' && '/graphql/scalars' || '' }}
SITE_URL: ${{ github.ref == 'refs/heads/master' && 'https://the-guild.dev/graphql/scalars' || '' }}
NEXT_PUBLIC_ALGOLIA_INDEX_NAME: ${{ secrets.NEXT_PUBLIC_ALGOLIA_INDEX_NAME }}
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY }}
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
with:
cloudflareApiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
cloudflareAccountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: graphql-scalars
prId: ${{ github.event.pull_request.number }}
websiteDirectory: website
buildScript: yarn build && yarn export
artifactDir: out

0 comments on commit ee991b9

Please sign in to comment.