add dr ranjitha #14
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
on: push | |
name: π Deploy website on push | |
jobs: | |
build: | |
name: β Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Get latest code | |
uses: actions/checkout@main | |
- name: β Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: π Install Yarn | |
run: npm install -g yarn | |
- name: π¦ Installing Packages | |
run: yarn install | |
- name: ποΈ Buidling Project | |
env: | |
PUBLIC_SANITY_PROJECT_ID: ${{ secrets.PUBLIC_SANITY_PROJECT_ID }} | |
PUBLIC_SANITY_DATASET: ${{ secrets.PUBLIC_SANITY_DATASET }} | |
PUBLIC_SANITY_GRAPHQL_URL: ${{ secrets.PUBLIC_SANITY_GRAPHQL_URL }} | |
run: yarn build | |
working-directory: ./web | |
- name: π₯ Archive production artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: dist | |
path: web/dist/ | |
deploy: | |
name: π Deploy | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
# - name: π Get latest code | |
# uses: actions/checkout@main | |
- name: β¬οΈ Download artifact | |
uses: actions/download-artifact@main | |
with: | |
name: dist | |
- name: π§ͺ Test Artifact | |
run: ls -R | |
- name: π Global Config | |
run: git config --global user.email "[email protected]" && git config --global user.name "Your Name" | |
- name: ποΈ Gitify | |
run: git init | |
- name: πΈοΈ Commit | |
run: git add . && git commit -m "Init" | |
- name: π Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
ftp-server: ${{ secrets.FTP_SERVER }} | |
ftp-username: ${{ secrets.FTP_USERNAME }} | |
ftp-password: ${{ secrets.FTP_PASSWORD }} | |
git-ftp-args: --insecure |