-
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.
Adjustments to new workflows. Update build.yml Update deploy.yml Update deploy.yml Update build.yml Update deploy.yml Update deploy.yml Update deploy.yml Update deploy.yml Update build.yml Update build.yml Finally think I fixed it... strip_components needed to be 1, not 2. Adjusted hover styles. Merged workflow changes from main. Fixed styles for code highlighting and theme toggle button. Added color transition and increased duration for theme switch to avoid flashbanging someone. added color transitions to code blocks
- Loading branch information
Showing
11 changed files
with
176 additions
and
67 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 |
---|---|---|
@@ -1,38 +1,38 @@ | ||
name: Build and Publish | ||
name: Build, Test and Transfer | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
name: Pull, Build & Deploy to AWS | ||
Build_and_Test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
|
||
- name: Install dependencies | ||
uses: bahmutov/npm-install@v1.6.0 | ||
- name: Install Node Deps | ||
uses: bahmutov/npm-install@v1.10.2 | ||
with: | ||
working-directory: ./frontend | ||
|
||
- name: Build Frontend | ||
- name: NPM Run Build (Vite) | ||
working-directory: ./frontend | ||
run: npm run build | ||
#run tests here eventually | ||
|
||
- name: Copy frontend files to webserver folder | ||
uses: appleboy/[email protected].4 | ||
- name: SCP Build Artifact to AWS | ||
uses: appleboy/[email protected].7 | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
port: ${{ secrets.PORT }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
source: "frontend/build/" | ||
target: "/var/www/${{ secrets.DOMAIN }}" | ||
strip_components: 2 | ||
source: "frontend/build,frontend/package.json,frontend/package-lock.json" | ||
target: "~/${{ secrets.DOMAIN }}" | ||
rm: true | ||
strip_components: 1 |
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,39 @@ | ||
name: Prepare and Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: ["Build, Test and Transfer"] | ||
types: [completed] | ||
|
||
jobs: | ||
Prepare: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
port: ${{ secrets.PORT }} | ||
script: | | ||
export NVM_DIR=~/.nvm | ||
source ~/.nvm/nvm.sh | ||
cd ~/${{ secrets.DOMAIN }} | ||
npm ci --omit dev | ||
Publish: | ||
needs: [Prepare] | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
port: ${{ secrets.PORT }} | ||
script: | | ||
export NVM_DIR=~/.nvm | ||
source ~/.nvm/nvm.sh | ||
pm2 restart ${{ secrets.DOMAIN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%sveltekit.assets%/favicon.png" /> | ||
<link rel="icon" href="https://fav.farm/📜" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
%sveltekit.head% | ||
</head> | ||
<body class="latte dark:frappe bg-crust h-full min-h-screen" data-sveltekit-preload-data="hover" > | ||
<div class="text" style="display: contents">%sveltekit.body%</div> | ||
</body> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%sveltekit.assets%/favicon.png" /> | ||
<link rel="icon" href="https://fav.farm/📜" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
%sveltekit.head% | ||
</head> | ||
<body class="latte dark:frappe h-full min-h-screen" data-sveltekit-preload-data="hover" > | ||
<div class="text" style="display: contents">%sveltekit.body%</div> | ||
</body> | ||
</html> |
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
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
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
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
Oops, something went wrong.