diff --git a/.github/workflows/gh-pages-deploy.yml b/.github/workflows/gh-pages-deploy.yml new file mode 100644 index 0000000..04419c4 --- /dev/null +++ b/.github/workflows/gh-pages-deploy.yml @@ -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 diff --git a/README.md b/README.md index fa53e13..6053508 100644 --- a/README.md +++ b/README.md @@ -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/.