Skip to content

Commit

Permalink
Merge pull request #3 from dmccartney/daniel-ci-web
Browse files Browse the repository at this point in the history
build: add PR and release workflows
  • Loading branch information
dmccartney authored May 7, 2023
2 parents 9bd0132 + 7a915e3 commit 8189d28
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/web-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
pull_request:
paths:
- "web/**"
- ".github/**"
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_deploy_web_preview:
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
working-directory: ./web
- run: npm run build
working-directory: ./web
env:
REACT_APP_ALCHEMY_KEY: "${{ secrets.ALCHEMY_KEY }}"
REACT_APP_WALLET_CONNECT_PROJECT_ID: "${{ secrets.WALLET_CONNECT_PROJECT_ID }}"
REACT_APP_ROCKET_SWEEP_URL: "https://rocketsweep.app"
GENERATE_SOURCEMAP: "false"
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_PROD_SERVICE_ACCOUNT }}"
projectId: "${{ secrets.FIREBASE_PROD_PROJECT_ID }}"
24 changes: 24 additions & 0 deletions .github/workflows/web-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
release:
types: [published]
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
working-directory: ./web
- run: npm run build
working-directory: ./web
env:
REACT_APP_ALCHEMY_KEY: "${{ secrets.ALCHEMY_KEY }}"
REACT_APP_WALLET_CONNECT_PROJECT_ID: "${{ secrets.WALLET_CONNECT_PROJECT_ID }}"
REACT_APP_ROCKET_SWEEP_URL: "https://rocketsweep.app"
GENERATE_SOURCEMAP: "false"
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_PROD_SERVICE_ACCOUNT }}"
channelId: live
projectId: "${{ secrets.FIREBASE_PROD_PROJECT_ID }}"
# TODO: parallel job to pin to ipfs to https://rocketsweep.eth.limo
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"scripts": {
"pretty": "npx prettier '**/*.{sol,js}' --write"
"pretty": "npx prettier '**/*.{sol,js,yml}' --write"
},
"devDependencies": {
"prettier": "^2.8.8",
Expand Down

0 comments on commit 8189d28

Please sign in to comment.