Setup basic framing for infra #4
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: exoflow.cloud - CD | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: pages | |
cancel-in-progress: false | |
env: | |
WORKING_DIR: ${{ github.workspace }}/apps/exoflow.cloud | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: apps/exoflow.cloud/.nvmrc | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
with: | |
static_site_generator: nuxt | |
- name: Install dependencies | |
working-directory: ${{ env.WORKING_DIR }} | |
run: | | |
npm ci | |
- name: Static HTML export with Nuxt | |
working-directory: ${{ env.WORKING_DIR }} | |
run: | | |
npm run generate | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ${{ env.WORKING_DIR }}/dist | |
deploy: | |
runs-on: ubuntu-latest | |
needs: | |
- package | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |