Fix git clone in extended docs #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: [push] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Build VuePress | |
run: | | |
yarn | |
yarn vuepress build src/um-stripe | |
yarn vuepress build src/um-extended | |
yarn vuepress build src/um-social-login | |
- name: Commit files | |
run: | | |
mkdir deploy/um-stripe/ | |
mkdir deploy/extended/ | |
mkdir deploy/social-login/ | |
mv um-stripe/dist/* deploy/um-stripe/ | |
mv extended/dist/* deploy/extended/ | |
mv social-login/dist/* deploy/social-login/ | |
sed -i '1d' .gitignore | |
cd deploy/ | |
git init | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -a -m "Deploy Stripe Docs" | |
git push --force https://username:${{ secrets.DOCS_V3_ACTION_SECRET }}@github.com/ultimatemember/docs-v3.git master:gh-pages | |
rm -fr .git | |