Skip to content

Update adding local meta tags for SEO purposes #50

Update adding local meta tags for SEO purposes

Update adding local meta tags for SEO purposes #50

Workflow file for this run

# -------------------------- armsx2 workflow by SternXD --------------------------
name: Build and Deploy armsx2-web
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Bun
uses: oven-sh/setup-bun@v2.0.2
- name: Install dependencies
run: bun install
- name: Build project
run: bun run build
- name: Inject AdSense script into built index.html
run: |
TARGET=dist/index.html
if [ -f "$TARGET" ]; then
perl -0777 -pe 's|</head>|<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9488650306417329" crossorigin="anonymous"></script>\n</head>|' -i "$TARGET"
echo "Injected AdSense script into $TARGET"
else
echo "$TARGET not found — skipping injection" && exit 1
fi
- name: Deploy to server
uses: appleboy/scp-action@v1.0.0
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SERVER_PASSWORD }}
source: "dist/*"
target: "/home/armsx2/htdocs/armsx2.net"
strip_components: 1