Skip to content

Commit

Permalink
fix(tooling): skip deploys in fork PRs (#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias committed Sep 23, 2020
1 parent 0faa3d9 commit b7be701
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/main.yml
@@ -1,6 +1,12 @@
name: CI

on: [push]
on:
push:
branches:
- "master"
pull_request:
branches:
- "*"

jobs:
deploy:
Expand All @@ -15,7 +21,6 @@ jobs:
- uses: actions/setup-node@v2-beta
with:
node-version: '12'

# get lotus deps...
- run: sudo apt install bzr

Expand All @@ -26,6 +31,7 @@ jobs:
# Pin the built site to ipfs-cluster, output the cid as `steps.ipfs.outputs.cid`
# see: https://github.com/ipfs-shipyard/ipfs-github-action
- uses: ipfs-shipyard/ipfs-github-action@v2.0.0
if: github.event.pull_request == 0 || github.event.pull_request.head.repo.full_name == github.repository
id: ipfs
with:
path_to_add: public
Expand All @@ -37,12 +43,9 @@ jobs:

- run: echo /ipfs/${{ steps.ipfs.outputs.cid }}

- run: echo ${{ github.ref }}

# Update the dnslink if changes to the current branch should go live
# see https://github.com/ipfs-shipyard/js-dnslink-dnsimple
- run: npx dnslink-dnsimple --domain spec.filecoin.io --link /ipfs/${{ steps.ipfs.outputs.cid }}
if: github.ref == 'refs/heads/master'
env:
DNSIMPLE_TOKEN: ${{ secrets.DNSIMPLE_TOKEN }}
# TODO: change to master once merged.
if: github.ref == 'refs/heads/master'

0 comments on commit b7be701

Please sign in to comment.