-
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 #22 from yuru-baku/autodeploy
Autodeploy vue to pages
- Loading branch information
Showing
5 changed files
with
66 additions
and
71 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,55 @@ | ||
name: Build and Deploy Vue App | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
env: | ||
working-directory: frontend-vue | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Use Node.js 20 | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache Dependencies | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{env.working-directory}}/node_modules | ||
key: ${{ runner.os }}-build-${{ hashFiles('package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build- | ||
- name: Install dependencies (on cache miss) | ||
working-directory: ${{env.working-directory}} | ||
if: steps.cache-dependencies.outputs.cache-hit == false | ||
run: npm ci | ||
|
||
- name: Build the Vue app | ||
working-directory: ${{env.working-directory}} | ||
run: npm run build | ||
|
||
- name: Fix permissions | ||
run: | | ||
chmod -c -R +rX "${{env.working-directory}}/dist" | while read line; do | ||
echo "::warning title=Invalid file permissions automatically fixed::$line" | ||
done | ||
- name: Upload GitHub Pages artifact | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{env.working-directory}}/dist | ||
- name: Deploy to GitHub Pages | ||
uses: actions/[email protected] |
This file was deleted.
Oops, something went wrong.
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