Skip to content

Commit

Permalink
build: deploy to cdn.juno.build (#13)
Browse files Browse the repository at this point in the history
* build: deploy to cdn.juno.build

* chore: format
  • Loading branch information
peterpeterparker authored Mar 30, 2024
1 parent de4be6a commit 38c40b6
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,28 @@ jobs:
with:
files: |
./nextjs-blank.tar.gz
deploy:
name: Deploy to CDN
runs-on: ubuntu-latest
needs: ['docker-build']
steps:
- uses: actions/checkout@v4

- name: Download nextjs-blank
uses: actions/download-artifact@v4
with:
name: nextjs-blank.tar.gz
path: out/templates

- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Deploy to Juno
uses: junobuild/juno-action@main
with:
args: deploy
env:
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ Thumbs.db
UserInterfaceState.xcuserstate

dist/

out/
18 changes: 18 additions & 0 deletions juno.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {defineConfig} from '@junobuild/config';

export default defineConfig({
satellite: {
id: 'fmkjf-bqaaa-aaaal-acpza-cai',
source: 'out',
storage: {
headers: [
{
source: '**/templates/**/*',
headers: [['Content-Type', 'application/octet-stream']]
}
]
},
encoding: [['**/templates/*.tar.gz', 'identity']],
gzip: false
}
});
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"prompts": "^2.4.2"
},
"devDependencies": {
"@junobuild/config": "^0.0.5",
"@types/node": "^20.10.8",
"@types/prompts": "^2.4.9",
"@typescript-eslint/eslint-plugin": "^6.15.0",
Expand Down

0 comments on commit 38c40b6

Please sign in to comment.