π€Έπ½ Build & Deploy #647
This file contains 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
name: π€Έπ½ Build & Deploy | |
on: | |
push: | |
branches: [main] | |
schedule: | |
- cron: '0 9 * * *' | |
jobs: | |
deploy: | |
name: π€Έπ½ Build & Deploy | |
if: github.repository == 'senar-ai/web' | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # This is required to allow the GitHub Action to authenticate with Deno Deploy. | |
contents: read | |
steps: | |
- name: π Clone repository | |
uses: actions/checkout@v3 | |
- name: π¦ Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: β Install Node deps | |
uses: bahmutov/npm-install@v1 | |
- name: πΏ Remix Build | |
run: npm run build | |
- name: π Make deno dir | |
run: mkdir -p ./deno | |
- name: π Copy Remix build files into output dir | |
run: cp -R ./{build,public} ./deno | |
- name: π Deploy to Deno Deploy | |
uses: denoland/deployctl@v1 | |
with: | |
project: senarai # the name of the project on Deno Deploy | |
entrypoint: './build/index.js' # the entrypoint to deploy | |
root: './deno' # the root directory of the build assets |