Skip to content

Commit

Permalink
make trivial test change (#1)
Browse files Browse the repository at this point in the history
* make trivial test change

* preview script fix?

* resource accessible?

* preview URL?

* remove undeploy

* test

* update stuff

* url change?

* update

* set undeploy to false

* change env

* update preview script

* update id

* try changing undeploy

* undeploy false

* argghh

* update gh action scripts

* update trunk version
  • Loading branch information
diversable authored Dec 13, 2023
1 parent 3100c2d commit 45d1e7b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/spin_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ jobs:
timeout-minutes: 10

environment:
name: github
# NB: CHANGE THIS TO `app_url` WHEN FERMYON FIXES THE BUG IN THEIR GH ACTION
name: production
url: ${{ steps.deployment.outputs.app-url }}

runs-on: ubuntu-latest
Expand Down Expand Up @@ -80,6 +79,6 @@ jobs:
fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }}

# Create an explicit message to display the URL of the deployed app, as well as in the job graph
# - name: Deployed URL
# run: |
# echo "Deployed app URL: ${{ steps.deployment.outputs.app-url }}" >> $GITHUB_STEP_SUMMARY
- name: Deployed URL
run: |
echo "Deployed app URL: ${{ steps.deployment.outputs.app-url }}" >> $GITHUB_STEP_SUMMARY
16 changes: 10 additions & 6 deletions .github/workflows/spin_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ jobs:
timeout-minutes: 10

environment:
name: github
# NB: CHANGE THIS TO `app_url` WHEN FERMYON FIXES THE BUG IN THEIR GH ACTION
url: ${{ steps.deployment.outputs.app-url }}
name: preview
url: ${{ steps.preview.outputs.app-url }}

runs-on: ubuntu-latest

Expand All @@ -60,7 +59,7 @@ jobs:


- name: Download and install Trunk binary
run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.17.5/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.18.0/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-


- name: Build with Trunk
Expand All @@ -76,9 +75,14 @@ jobs:


- name: Build and preview
id: deployment
id: preview
uses: fermyon/actions/spin/preview@v1
with:
fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
undeploy: ${{ github.event.pull_request && github.event.action == 'closed' }}
undeploy: ${{ github.event.pull_request && github.event.action == 'closed' }}


- name: Display Deployed URL
run: |
echo "Deployed app URL: ${{ steps.preview.outputs.app-url }}" >> $GITHUB_STEP_SUMMARY
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ fn App() -> impl IntoView {
view! {
<h1>"Hello from Leptos and Spin"</h1>

<h2>"This is a test of Spin Cloud Preview"</h2>

<p>
"For ease of development, run `trunk watch` in one terminal while also running `spin watch` in another terminal -- on changes, the only thing you need to do is reload the browser window: Leptos and Spin will take care of the rest!"
</p>
Expand Down

0 comments on commit 45d1e7b

Please sign in to comment.