-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM jetpackio/devbox:latest | ||
|
||
# Installing your devbox project | ||
WORKDIR /code | ||
USER ${DEVBOX_USER}:${DEVBOX_USER} | ||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json | ||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock | ||
|
||
|
||
|
||
RUN devbox run -- echo "Installed Packages." | ||
|
||
RUN devbox shellenv --init-hook >> ~/.profile |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "Devbox Remote Container", | ||
"build": { | ||
"dockerfile": "./Dockerfile", | ||
"context": ".." | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"jetpack-io.devbox" | ||
] | ||
} | ||
}, | ||
"remoteUser": "devbox" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Deploy to GH Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "frontend/**" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: "npm" | ||
cache-dependency-path: "./frontend/package-lock.json" | ||
|
||
- name: Install Dependencies and Build | ||
run: "cd ./frontend && npm install && npm run build" | ||
env: | ||
VITE_FUNCTION_URL: ${{ secrets.VITE_FUNCTION_URL }} | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
name: frontend-dist # Set a name for the artifact | ||
path: "./frontend/dist" # Upload the dist directory within /frontend | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 | ||
with: | ||
artifact_name: frontend-dist |