Update me.json with new location and phone number, and update job des… #22
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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | |
name: React Native CI/CD | |
on: | |
push: | |
branches: main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: cd app && npm ci | |
# - run: cd app && npm test | |
publish-artifact: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://npm.pkg.github.com/ | |
- run: cd app && npm ci | |
- run: cd app && npx expo export --platform web | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: | | |
app/dist | |
!app/dist/**/*.md | |
deploy-dev: | |
name: 🎉 Deploy dev | |
environment: | |
name: dev | |
url: https://me-native-dev.talaman.info/ | |
needs: publish-artifact | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚚 Get latest code from artifact dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Display structure of downloaded files | |
run: ls -R dist | |
- name: 📂 Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
local-dir: dist/ | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
deploy-prod: | |
name: 🚀 Deploy prod | |
environment: | |
name: prod | |
url: https://me-native.talaman.info/ | |
needs: deploy-dev | |
if: github.ref_name == 'main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚚 Get latest code from artifact dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Display structure of downloaded files | |
run: ls -R dist | |
- name: 📂 Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
local-dir: dist/ | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} |