Update aws-iam-users-source.md (#5673) #70
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: deploy-to-pantheon | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy-to-pantheon: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: production | |
| url: https://www.sumologic.com/ | |
| env: | |
| CI: true | |
| NODE_ENV: production | |
| NODE_OPTIONS: "--max-old-space-size=8192 --max-http-header-size=8192" | |
| HOSTNAME: https://www.sumologic.com | |
| BASE_URL: /help/ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install SSH key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.PANTHEON_SSH_KEY }} | |
| config: | | |
| Host *.drush.in | |
| StrictHostKeyChecking no | |
| known_hosts: ${{ secrets.PANTHEON_KNOWN_HOSTS }} | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.2" | |
| - name: Install Terminus | |
| uses: pantheon-systems/terminus-github-actions@v1 | |
| with: | |
| pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20.x' | |
| cache: 'yarn' | |
| - name: Docusaurus Webpack cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: node_modules/.cache | |
| key: ${{ runner.os }}-webpack-cache-${{ hashFiles('yarn.lock') }} | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Build the Docusaurus site | |
| run: yarn build | |
| - name: Pantheon, check environment and deploy helpdocs | |
| run: | | |
| # Check for helpdocs environment in Pantheon, create one if not found | |
| PANTHEON_ENV_LIST="$(terminus env:list "${{ vars.PANTHEON_SITE_ID }}" --format=list | xargs)" | |
| DEV_SITE_EXISTS="$(echo "$PANTHEON_ENV_LIST" | grep "helpdocs" | wc -l | xargs)" | |
| if [ "$DEV_SITE_EXISTS" -eq "0" ]; then | |
| terminus multidev:create --no-interaction --no-ansi ${{ vars.PANTHEON_SITE_ID }}.dev helpdocs | |
| terminus lock:enable ${{ vars.PANTHEON_SITE_ID }}.helpdocs -- "${{ secrets.PANTHEON_AUTH_USER }}" "${{ secrets.PANTHEON_AUTH_PASSWORD }}" | |
| fi | |
| # Put environment in SFTP mode, because we're using rsync to move files up | |
| terminus connection:set ${{ vars.PANTHEON_SITE_ID }}.helpdocs sftp | |
| terminus self:plugin:install terminus-rsync-plugin | |
| mv ./build ./help | |
| terminus rsync ./help ${{ vars.PANTHEON_SITE_ID }}.helpdocs:code | |
| terminus env:commit --message "Production build of helpdocs" --force -- ${{ vars.PANTHEON_SITE_ID }}.helpdocs |