-
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
1 changed file
with
60 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,60 @@ | ||
name: Deploy to Github Pages # Defines the name of the GitHub Actions workflow. | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Triggers the workflow on each push to the 'develop' branch. | ||
|
||
jobs: | ||
build: | ||
name: Build # Defines the name of the build job. | ||
runs-on: ubuntu-latest # Specifies the operating system for the job. | ||
|
||
steps: | ||
- name: Checkout Repo # Checks out the repository. | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create Node Environment # Sets up Node.js environment. | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install Packages and Build Application # Installs npm packages and builds the Vue.js application. | ||
run: | | ||
install npm | ||
npm ci | ||
npm run build | ||
- name: Setup Pages # Configures pages for deployment. | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Build with Jekyll # Builds the application with Jekyll. | ||
uses: actions/jekyll-build-pages@v1 | ||
with: | ||
source: ./dist/ | ||
destination: ./_site | ||
|
||
- name: Upload artifact # Uploads the build artifact. | ||
uses: actions/upload-pages-artifact@v2 | ||
|
||
deploy: | ||
name: Deploy Application # Defines the name of the deployment job. | ||
|
||
# Add a dependency to the build job | ||
needs: build # Specifies that the deployment job depends on the successful completion of the build job. | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # Grants write permission to deploy to Pages. | ||
id-token: write # Grants write permission to verify the deployment source. | ||
|
||
environment: | ||
name: github-pages # Specifies the environment for deployment. | ||
url: ${{ steps.deployment.outputs.page_url }} # Retrieves the deployment URL from the previous deployment step. | ||
|
||
runs-on: ubuntu-latest # Specifies the operating system for the deployment job. | ||
steps: | ||
- name: Deploy to GitHub Pages # Deploys the application to GitHub Pages. | ||
id: deployment | ||
uses: actions/deploy-pages@v2 # Specifies the version of the deployment action. |