Skip to content

Commit

Permalink
Add GH Pages deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hrynko committed May 11, 2024
1 parent 238b9e9 commit a6f3801
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/gh-pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

permissions:
contents: read
id-token: write
pages: write

concurrency:
group: github-pages
cancel-in-progress: true

env:
HUSKY: 0

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: dist
deploy:
needs: build
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
runs-on: ubuntu-latest
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v2
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# hrynko.github.io

[Hrynko](https://github.com/hrynko)'s personal website, which is powered by Jamstack and is based on Astro.

## Development

There are no special prerequisites other than the `node@20` environment. Once the project repository is cloned and the dependencies are installed, the development server can be started with the `dev` script (see [package.json](./package.json)).

## Deployment

![GitHub workflow status](https://img.shields.io/github/actions/workflow/status/hrynko/hrynko.github.io/gh-pages-deploy.yml)
[![Website state](https://img.shields.io/website?url=https%3A%2F%2Fhrynko.github.io&label=hrynko.github.io)](https://hrynko.github.io)

There is a [GitHub Actions workflow](.github/workflows/gh-pages-deploy.yml) configured to automatically build and deploy to GitHub Pages when a push to the `main` branch occurs. The site itself is reachable at https://hrynko.github.io/.

0 comments on commit a6f3801

Please sign in to comment.