Skip to content

Commit

Permalink
Create custom-domain.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hawk0120 authored Dec 11, 2024
1 parent 32859b1 commit df061f7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/custom-domain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Update Custom Domain

on:
push:
branches:
- gh-pages

permissions:
contents: write

jobs:
update-domain:
runs-on: ubuntu-latest

steps:
- name: Check out gh-pages branch
uses: actions/checkout@v3
with:
ref: gh-pages

- name: Update custom domain file
run: echo "www.bradyhawkins.dev" > CNAME

- name: Commit and push CNAME file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CNAME
git commit -m "Update custom domain to www.bradyhawkins.dev" || echo "No changes to commit"
git push origin gh-pages

0 comments on commit df061f7

Please sign in to comment.