Skip to content

Commit ec089a1

Browse files
committed
Add astro build to actions workflow.
1 parent 0e50ef5 commit ec089a1

File tree

2 files changed

+51
-44
lines changed

2 files changed

+51
-44
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
1-
name: Hugo Build
1+
name: Deploy to GitHub Pages
22

33
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
46
push:
5-
branches:
6-
- hugo # Set a branch to deploy
7-
pull_request:
7+
branches: [astro]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
810

9-
jobs:
10-
deploy:
11-
runs-on: ubuntu-22.04
12-
permissions:
13-
contents: write
14-
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
17-
steps:
18-
- uses: actions/checkout@v3
19-
with:
20-
submodules: true # Fetch Hugo themes (true OR recursive)
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
2116

22-
- name: Setup Hugo
23-
uses: peaceiris/actions-hugo@v2
24-
with:
25-
hugo-version: '0.110.0'
26-
# extended: true
17+
# Allow one concurrent deployment
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: true
2721

28-
- name: Build
29-
run: |
30-
env HUGO_ENV="production" hugo --minify --baseURL "https://emeraldjava.github.io/"
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout your repository using git
27+
uses: actions/checkout@v4
28+
- name: Install, build, and upload your site output
29+
uses: withastro/action@v2
3130

32-
- name: Deploy
33-
uses: peaceiris/actions-gh-pages@v3
34-
if: ${{ github.ref == 'refs/heads/hugo' }}
35-
with:
36-
github_token: ${{ secrets.GITHUB_TOKEN }}
37-
publish_dir: ./public
38-
publish_branch: gh-pages
31+
deploy:
32+
needs: build
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
steps:
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,24 @@
44

55
My site should be @ [https://emeraldjava.github.io/](http://emeraldjava.github.io/)
66

7-
## Local Dev
7+
# Astro
8+
9+
## Migration
10+
11+
- https://docs.astro.build/en/guides/migrate-to-astro/from-hugo/
12+
- https://mckerlie.com/posts/migrating-your-blog-from-hugo-to-astro/
13+
14+
15+
# Hugo
16+
17+
## github-style
18+
19+
- https://themes.gohugo.io/themes/github-style/
20+
- https://github.com/gitalk/gitalk
21+
22+
git submodule add https://github.com/MeiK2333/github-style.git themes/github-style
23+
24+
# Gatsby
825

926
Use the -H to set the hostname IP address for remote access
1027

@@ -22,15 +39,3 @@ see
2239

2340
- https://github.com/vchrombie/vchrombie.github.io
2441
- https://github.com/vchrombie/blog
25-
-
26-
27-
A new machine.gh
28-
29-
# Hugo
30-
31-
## github-style
32-
33-
- https://themes.gohugo.io/themes/github-style/
34-
- https://github.com/gitalk/gitalk
35-
36-
git submodule add https://github.com/MeiK2333/github-style.git themes/github-style

0 commit comments

Comments
 (0)