Skip to content

Commit 4b18804

Browse files
committed
chore: try amd64 runner
1 parent de985b0 commit 4b18804

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy Hugo site to Pages
22

33
on:
44
push:
5-
branches: ["main", "design-adjustments"]
5+
branches: ["main", "refactor-merge"]
66

77
permissions:
88
contents: read
@@ -13,23 +13,25 @@ env:
1313
HUGO_ENV: production
1414
HUGO_VERSION: "0.147.7"
1515
GO_VERSION: "1.24.3"
16-
NODE_VERSION: "22.16.0"
16+
NODE_VERSION: "22.x" # Use major version for setup-node
1717

1818
jobs:
1919
build:
20-
runs-on: ubuntu-24.04-arm
20+
# Switched to a standard x86_64 runner for better package compatibility
21+
runs-on: ubuntu-24.04
2122
steps:
2223
- name: Install Hugo
2324
run: |
24-
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-arm64.deb \
25+
# Updated to use amd64 for the new runner
26+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
2527
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
2628
2729
- name: Install Go
2830
run: |
29-
# Corrected to download linux-arm64 for ARM runner
30-
wget -O ${{ runner.temp }}/go.tar.gz https://go.dev/dl/go${GO_VERSION}.linux-arm64.tar.gz \
31+
# Updated to use amd64 for the new runner
32+
wget -O ${{ runner.temp }}/go.tar.gz https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz \
3133
&& sudo tar -C /usr/local -xzf ${{ runner.temp }}/go.tar.gz \
32-
&& sudo ln -s /usr/local/go/bin/go /usr/local/bin/go # Ensure go is in PATH
34+
&& sudo ln -s /usr/local/go/bin/go /usr/local/bin/go
3335
3436
- name: Install wkhtmltopdf
3537
run: |
@@ -46,8 +48,15 @@ jobs:
4648
id: pages
4749
uses: actions/configure-pages@v5
4850

51+
# Best practice: Use setup-node with caching
52+
- name: Setup Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: ${{ env.NODE_VERSION }}
56+
cache: 'npm'
57+
4958
- name: Install npm dependencies
50-
run: npm install
59+
run: npm ci # Use npm ci for faster, more reliable CI builds
5160

5261
- name: Determine Base URL
5362
id: base_url
@@ -82,7 +91,6 @@ jobs:
8291
- name: Create and Populate .htaccess
8392
run: |
8493
echo "Creating and populating .htaccess in public directory"
85-
# Ensure public directory exists (though npm run build should create it)
8694
mkdir -p public
8795
cat .github/config/htaccess.template > public/.htaccess
8896
echo ".htaccess created and populated."
@@ -94,10 +102,8 @@ jobs:
94102
echo "Current BASE_URL for .htaccess modification: $BASE_URL"
95103
if [[ "$BASE_URL" != "https://open-neuromorphic.org/" ]]; then
96104
echo "Modifying .htaccess to prevent indexing for $BASE_URL"
97-
# The file is created by the workflow user, sudo likely not needed for chmod.
98-
# If issues persist, can use sudo, but check file ownership first.
99-
chmod u+w public/.htaccess # Ensure user has write permission
100-
echo "" >> public/.htaccess # Add a newline for separation
105+
chmod u+w public/.htaccess
106+
echo "" >> public/.htaccess
101107
echo "# Rules to prevent indexing on non-production deployments" >> public/.htaccess
102108
echo "Header set X-Robots-Tag \"noindex, nofollow\"" >> public/.htaccess
103109
echo ".htaccess modified."
@@ -130,7 +136,8 @@ jobs:
130136
environment:
131137
name: github-pages
132138
url: ${{ steps.deployment.outputs.page_url }}
133-
runs-on: ubuntu-24.04-arm
139+
# Switched to a standard x86_64 runner for consistency
140+
runs-on: ubuntu-24.04
134141
needs: build
135142
steps:
136143
- name: Deploy to GitHub Pages

0 commit comments

Comments
 (0)