feat(coredao-testnet): remove ens code #5
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: Deploy to Core Testnet | |
on: | |
pull_request: | |
push: | |
branches: ['coredao/testnet'] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
env: | |
ARCHIVE_NAME: ${{ github.event.repository.name }} | |
name: Deploy to testnet | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
# Post a PR comment before deploying | |
- name: Post a comment while building | |
if: github.event.number | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message-id: praul | |
message: | | |
## Branch preview | |
⏳ Deploying a preview site... | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
repo-token-user-login: 'github-actions[bot]' | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/yarn | |
- uses: ./.github/workflows/build | |
with: | |
secrets: ${{ toJSON(secrets) }} | |
- name: Create archive | |
run: tar -czf "$ARCHIVE_NAME".tar.gz dist | |
# Staging | |
- name: Deploy to the coredao | |
uses: cross-the-world/ssh-scp-ssh-pipelines@latest | |
with: | |
host: ${{ secrets.TEST_HOST }} | |
user: ${{ secrets.TEST_USER }} | |
key: ${{ secrets.TEST_KEY }} | |
connect_timeout: 10s | |
first_ssh: | | |
mkdir ~/tmp | true | |
sudo mkdir /usr/share/nginx/safe | true | |
sudo mkdir /usr/share/nginx/safe-new | true | |
scp: | | |
$ARCHIVE_NAME.tar.gz => /home/ec2-user/tmp | |
last_ssh: | | |
cd tmp | |
tar -xzvf $ARCHIVE_NAME.tar.gz | |
sudo cp -rf /home/ec2-user/tmp/dist/* /usr/share/nginx/safe | |
sudo cp -rf /home/ec2-user/tmp/dist/* /usr/share/nginx/safe-new | |
rm -rf /home/ec2-user/tmp/dist | |
rm $ARCHIVE_NAME.tar.gz | |
- name: Clean | |
run: | | |
rm -rf dist | |
rm $ARCHIVE_NAME.tar.gz |