-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor: [fa-722] update gha build and deploy #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9a1a49c
ff262a5
646ef87
f3d08cc
05e3950
72a61fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,49 @@ | ||
| name: deploy | ||
| on: | ||
| push: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| types: | ||
| - closed | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| pages: write | ||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: false | ||
| jobs: | ||
| build: | ||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
| node-version: 20 | ||
| cache: yarn | ||
| - id: yarn-cache-path | ||
| run: echo "::set-output name=dir::$(yarn cache dir)" | ||
| run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ steps.yarn-cache-path.outputs.dir }} | ||
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-yarn- | ||
| - run: yarn install --immutable | ||
| - run: yarn demo | ||
| - id: deployment | ||
| uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action | ||
| - name: Build demo page | ||
| run: | | ||
| yarn install --immutable | ||
| yarn demo | ||
| - name: Upload demo page | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: demo/dist/ | ||
|
|
||
| # Deploy job | ||
| deploy: | ||
| # Add a dependency to the build job | ||
| needs: build | ||
|
|
||
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
| permissions: | ||
| pages: write # to deploy to Pages | ||
| id-token: write # to verify the deployment originates from an appropriate source | ||
|
Comment on lines
-34
to
-37
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combined into a single job to simplify troubleshooting and moved permissions to the top |
||
|
|
||
| # Specify runner + deployment step | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| path: './demo/public' | ||
|
Comment on lines
+39
to
+42
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix missing Github Pages |
||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action | ||
| env: | ||
| name: preview | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| uses: actions/deploy-pages@v4 | ||
| # - name: Publish to NPMJS | ||
| # uses: JS-DevTools/npm-publish@v3 | ||
| # with: | ||
| # token: ${{ secrets.NPM_TOKEN }} | ||
|
Comment on lines
+46
to
+49
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is ready but want to limit the amount of change if there is trouble |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,4 +104,5 @@ dist | |
| .tern-port | ||
| lib | ||
|
|
||
| .DS_Store | ||
| .DS_Store | ||
| .secrets | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,12 +7,13 @@ | |
| "test/**/*.test-d.tsx" // we have a separate task where types are tested | ||
| ], | ||
| "compilerOptions": { | ||
| "target": "es2015", | ||
| "allowSyntheticDefaultImports": true, | ||
| "declaration": false, | ||
| "jsx": "react", | ||
| "moduleResolution": "node", | ||
| "outDir": "./lib", | ||
| "skipLibCheck": true, | ||
| "allowSyntheticDefaultImports": true, | ||
| "strict": true, | ||
| "outDir": "./lib", | ||
| "moduleResolution": "node" | ||
| "target": "es2015", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you want to, I think we could bump this up to something more modern.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i figured it was better to change as little as possible in case there was user impact. i don't want to wreck some IE9 user's day without at least a deprecation warning
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess that is fair, but
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah i see then it doesn't matter what my output target is, it will be chained to the "native" player's target 👍 we should sync those targets then
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we use es2017 there for now. |
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed so that PR must be merged to kick off deployment.