-
Notifications
You must be signed in to change notification settings - Fork 238
refactor(ci): local build #493
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2c027f1
refactor(ci): local CAR build
lidel 8a852a9
fix: npm
lidel 636d925
use deploy-action which uploads artifact
2color c820ab6
Apply suggestions from code review
2color c700946
chore: test kubo car creation
2color dfa9cd7
ci: bump action version
2color a38bc54
chore: test cluster pin expiry
2color d544628
chore: remove pin expiry
2color ed40296
test custom pin name
2color b23c2d1
remove custom pin-name and use default
2color 63d3cc7
ci: use v1 release of the ipfs-deploy-action
2color 5602391
chore(ci): dont touch dnslink yet
lidel 5f5bf93
Merge branch 'main' into local-CAR-build
lidel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| name: Build and Deploy | ||
|
|
||
| # Explicitly declare permissions | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| statuses: write | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| env: | ||
| BUILD_PATH: 'out' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true # Cancel in progress runs if a new run is started | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| cid: ${{ steps.deploy.outputs.cid }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci --prefer-offline --no-audit --progress=false | ||
|
|
||
| - name: Build project | ||
| run: make website | ||
|
|
||
| - name: Upload static files as artifact | ||
| id: upload-artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: ${{ env.BUILD_PATH }} | ||
|
|
||
| - uses: ipfs/ipfs-deploy-action@6b8f42e9e539bc5ab0624183eb31cd0383e59f5c | ||
| name: Deploy to IPFS Mirror Providers | ||
| id: deploy | ||
| with: | ||
| path-to-deploy: ${{ env.BUILD_PATH }} | ||
| cluster-url: "/dnsaddr/ipfs-websites.collab.ipfscluster.io" | ||
| cluster-user: ${{ secrets.CLUSTER_USER }} | ||
| cluster-password: ${{ secrets.CLUSTER_PASSWORD }} | ||
| storacha-key: ${{ secrets.STORACHA_KEY }} | ||
| storacha-proof: ${{ secrets.STORACHA_PROOF }} | ||
| #TODO pinata-jwt-token: ${{ secrets.PINATA_JWT_TOKEN }} | ||
| github-token: ${{ github.token }} | ||
|
|
||
| - name: Update DNSLink | ||
| if: false # TODO github.ref == 'refs/heads/main' # only update DNSLink for main branch | ||
| uses: ipfs/dnslink-action@v0.1 | ||
| with: | ||
| cid: ${{ steps.deploy.outputs.cid }} | ||
| dnslink_domain: 'specs.ipfs.tech' | ||
| cf_record_id: ${{ secrets.CF_RECORD_ID }} | ||
| cf_zone_id: ${{ secrets.CF_ZONE_ID }} | ||
| cf_auth_token: ${{ secrets.CF_AUTH_TOKEN }} | ||
| github_token: ${{ github.token }} | ||
| set_github_status: true | ||
|
|
||
|
|
||
| gh-pages: | ||
| runs-on: 'ubuntu-latest' | ||
| needs: build-and-deploy | ||
| if: github.ref == 'refs/heads/main' # only deploy to gh-pages for main branch | ||
| permissions: | ||
| pages: write # to deploy to Pages | ||
| id-token: write # to verify the deployment originates from an appropriate source | ||
| environment: | ||
| name: 'github-pages' | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| out/ | ||
| node_modules/ | ||
| super-linter.log |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.