Skip to content

Update package.json #204

Update package.json

Update package.json #204

Workflow file for this run

name: deployment
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 20.x
- run: npm i
- run: npx hexo g
- uses: actions/upload-artifact@master
with:
path: public
name: public
deploy-firebase:
runs-on: ubuntu-22.04
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 20.x
- uses: actions/download-artifact@master
with:
name: public
path: public
- name: deploy
run: |
cp assets/indexing-off.txt public/robots.txt
npm i -g firebase-tools
firebase deploy --token ${{ secrets.FIREBASE_TOKEN }}
deploy-ovh:
runs-on: ubuntu-22.04
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: public
path: public
- name: ftp
run: |
cp assets/indexing-off.txt public/robots.txt
cp assets/.htaccess public/.htaccess
cd public
find . -type f -exec curl --user xntprja:${{ secrets.FTP_PASSWORD }} --ftp-create-dirs -v -T {} ftp://ftp.cluster014.hosting.ovh.net:21/www/{} \;
deploy-github:
runs-on: ubuntu-22.04
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: public
path: public
- name: github
run: |
git clone https://github.com/tomap/tomap.github.io.git
rm -rf tomap.github.io/*
cp assets/indexing-off.txt public/robots.txt
cp -a public/. tomap.github.io
cd tomap.github.io
echo ${{ github.sha }} > sha.txt
# git status
git add .
# git config -l
git config --global user.email "${{ secrets.GITHUB_EMAIL }}"
git config --global user.name "tomap"
git commit -m "Update site"
git remote add origin-pages https://tomap:${{ secrets.GH_TOKEN }}@github.com/tomap/tomap.github.io.git
git push --set-upstream origin-pages master