-
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.
Merge pull request #1 from terraprompt/main
Added workflow
- Loading branch information
Showing
3 changed files
with
45 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,23 @@ | ||
name: Build & Deploy | ||
|
||
on: | ||
push: | ||
branches: [ "prod" ] | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create tarball of codebase | ||
run: tar -cf deploy.tar --exclude=deploy.tar . | ||
|
||
- name: Deploy App to CapRover | ||
uses: caprover/deploy-from-github@v1.0.1 | ||
with: | ||
server: '${{ secrets.CAPROVER_SERVER }}' | ||
app: '${{ secrets.APP_NAME }}' | ||
token: '${{ secrets.APP_TOKEN }}' |
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,18 @@ | ||
##################################################################### | ||
# Build Stage # | ||
##################################################################### | ||
FROM hugomods/hugo:exts as builder | ||
# Build site | ||
COPY . /src | ||
# Replace below build command at will. | ||
RUN hugo --minify --enableGitInfo | ||
# Set the fallback 404 page if defaultContentLanguageInSubdir is enabled, | ||
# please replace the `en` with your default language code. | ||
# RUN cp ./public/en/404.html ./public/404.html | ||
|
||
##################################################################### | ||
# Final Stage # | ||
##################################################################### | ||
FROM hugomods/hugo:nginx | ||
# Copy the generated files to keep the image as small as possible. | ||
COPY --from=builder /src/public /site |
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,4 @@ | ||
{ | ||
"schemaVersion": 2, | ||
"dockerfilePath": "./Dockerfile" | ||
} |