Skip to content

update deploy keys

update deploy keys #34

name: deploy gh-pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
GHTOKENMN: ${{ secrets.PUSH_TOKEN_MN }}
GHTOKENTH: ${{ secrets.PUSH_TOKEN_TH }}
steps:
- name: Checkout
uses: actions/checkout@master
with:
persist-credentials: false
- name: Setup git
run: |
git remote add mn https://thiagohersan:[email protected]/marinagem-www/infinitum.marinagem.com.git
git remote add th https://thiagohersan:[email protected]/thiagohersan-www/infinitum.thiagohersan.com.git
git config --local user.name "github-actions"
git config --local user.email "[email protected]"
git checkout --orphan gh-pages
git rm --cached -rf . &> /dev/null
echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
- name: Deploy MN
run: |
echo "infinitum.marinagem.com" > CNAME
git add assets/ css/ js/ index.html CNAME
git commit -m "update site: $GITHUB_SHA_SHORT" &> /dev/null
git push mn :gh-pages
git push mn gh-pages
- name: Deploy TH
run: |
echo "infinitum.thiagohersan.com" > CNAME
sed -i -e 's/infinitum.marinagem.com/infinitum.thiagohersan.com/g' index.html
git add CNAME index.html
git commit -m "update site: $GITHUB_SHA_SHORT" &> /dev/null
git push th :gh-pages
git push th gh-pages