Feature/new landing #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: warp-protocol-landing | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- warp/** | |
paths: | |
- apps/warp-protocol-landing/** | |
- .github/workflows/warp-protocol-landing.yml | |
pull_request: | |
branches: | |
- main | |
- warp/main | |
paths: | |
- apps/warp-protocol-landing/** | |
- .github/workflows/warp-protocol-landing.yml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
name: Publish to Cloudflare Pages | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get yarn cache dir | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- name: Cache yarn | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn install | |
working-directory: ./apps/warp-protocol-landing | |
- name: Build source code. | |
run: yarn run build | |
working-directory: ./apps/warp-protocol-landing | |
- id: publish | |
name: Publish to Cloudflare Pages | |
# if: contains(fromJson('["push", "synchronize"]'), github.event_name) | |
uses: cloudflare/pages-action@1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }} | |
accountId: 620ff29bbd515d2848f5306578bd1d1d | |
projectName: warp-protocol-landing | |
directory: apps/warp-protocol-landing/build | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
outputs: | |
url: ${{ steps.publish.outputs.url }} |