$Setup global variable implementation (#225) #77
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'expression-src/**' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v2 | |
| with: | |
| node-version: "20" | |
| - name: Install NPM | |
| run: | | |
| npm install | |
| - name: Install Cirrus | |
| run: | | |
| npm install -g cirrus-for-sfdx | |
| - name: Install Salesforce CLI | |
| run: npm install @salesforce/cli --global | |
| - name: Authenticate against dev hub | |
| run: echo ${{ secrets.DEV_HUB_AUTH_URL}} | sf org login sfdx-url --alias=devhub --set-default-dev-hub --sfdx-url-stdin - | |
| - name: Create Expression package version | |
| run: cirrus flow package | |
| generate-docs: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ssh-key: ${{ secrets.DEPLOY_KEY }} | |
| - uses: actions/setup-node@v2 | |
| with: | |
| node-version: "20" | |
| - name: Install NPM | |
| run: | | |
| npm install | |
| - name: Install Cirrus | |
| run: | | |
| npm install -g cirrus-for-sfdx | |
| - name: Generate Docs | |
| run: | | |
| cirrus run docs | |
| cirrus run generate-library-docs | |
| - name: Commit and Push Changes | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add . | |
| if [ -n "$(git status --porcelain)" ]; then | |
| git commit -m "Automated documentation update" | |
| git push origin ${{ github.ref }} | |
| else | |
| echo "No changes to commit" | |
| fi |