Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 22, 2024 - @0.38 (what is this?)
Forum activity rating: Three Stars Posts: 29/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :happy: Open the all windows! Your mind needs storms and air! :happy:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  HELP: Deploy... to... Neocities??


« previous next »
Pages: [1] Print
Author Topic: HELP: Deploy... to... Neocities??  (Read 778 times)
springhand
Casual Poster
*


heheheheheheheheh…

⛺︎ My Room

View Profile

First 1000 Members!Joined 2022!
« on: August 03, 2023 @422.56 »

I GIVE UP. I did try to read the instructions and find existing code examples to study, but, GAH!! I don't understand anything at all. Please help me :begging: :begging: :begging:

First, to preface: I have absolutely no knowledge regarding GitHub or Git or any programming languages whatsoever!! All I have stored in my brain is some very basic HTML and CSS.

Anyway, for a variety of reasons, I would rather not use the native Neocities interface to manage my files, and so thought about using the GitHub Action I've heard much about instead. I followed the instructions here and:

✓ Created a .github/workflows/deploy.yml with the following content:
Code
name: Build site

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - run: make

      - if: ${{ success() && github.ref == 'refs/heads/main' }}
        id: deploy
        continue-on-error: true
        uses: bcomnes/deploy-to-neocities@v1
        with:
          api_token: ${{ secrets.NEOCITIES_API_KEY }}
          dist_dir: public
          cleanup: true

      - name: Deploy to Neocities fallback
        if: ${{ steps.deploy.outcome == 'failure' && github.ref == 'refs/heads/main' }}
        uses: jonchang/deploy-neocities@master
        with:
          key: ${{ secrets.NEOCITIES_API_KEY }}
          dir: public
          clean: true


✓ Created a secret NEOCITIES_API_KEY with my API key

✓ Added `public` to .gitignore

✓ Put everything I currently have on my site in the `public` folder


All of the above was done in the `main` branch.


But here's the results...



And I have no idea where I did wrong :sad:

So I figured rather than fumbling about as a complete know-nothing, it's better to just ask, since it seems a lot of people use this.

Thank you in advance! :4u:
Logged
Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« Reply #1 on: August 03, 2023 @616.08 »

Im afraid I cant actually help (hopefully someone can after this) but I did want to ask; is there a reason your wanna use Git? Its a famously annoying and complex system to use (although there are many benefits if you know what your doing - I do know Git quite well, but even then I don't think Id ever use it for a neocities site because its way too much).

I totally support not using the NC web interface because it sucks; but there are alternatives!
  • If your a supporter WebDAV and a publishing app is the simplest system (though Im only aware of Nova having this feature built in, but I did find a VSCode extension that seems to do it too)
  • Otherwise the Command Line Interface is great!

Anyway I hope someone does answer your actual question since its good to know - but also worth being aware of some of the simpler alternatives  :pc:
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
Necrosia
Full Member ⚓︎
***


Lord of the Labyrinth

⛺︎ My Room

View Profile WWW

First 1000 Members!spring 2023!Welcome Soup!Joined 2023!
« Reply #2 on: August 03, 2023 @673.56 »

Lets give some steps back here, git can be pretty complex specially for an absolute beginner.

You don't want to use the native Neocities interface and that's fair but what are you trying to accomplish?
You want to edit the files locally on your machine? You want to save different versions? Or what?
Lets start from here to see how can I help you
Logged



 
Avatar by Urubu
RodFireProductions
Jr. Member ⚓︎
**


🍄🖤🐀

⛺︎ My Room
StatusCafe: rodfire8181
iMood: rodfire8181
Itch.io: My Games

View Profile WWW

First 1000 Members!Joined 2022!
« Reply #3 on: August 03, 2023 @821.37 »

I had no clue deploying from GitHub (or the API in general) was even an option. I didn't use Neocities because of that, but now I just might. I use GitHub and Git for all of my sites.

I decided to make an account and deploy a test site from GitHub. I got it working pretty easily by using this workflow.

Mine ended up looking like this:
Code
name: Deploy to neocities

# only run on changes to master
on:
  push:
    branches:
      - main

concurrency: # prevent concurrent deploys doing strange things
  group: deploy-to-neocities
  cancel-in-progress: true

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    # When the dist_dir is ready, deploy it to neocities
    - name: Deploy to neocities
      uses: bcomnes/deploy-to-neocities@v1
      with:
        api_token: ${{ secrets.NEOCITIES_API_KEY }}
        cleanup: false
        dist_dir: public

I'm deploying from my main branch, if you're not then you should change it in the code.

I hope this helps.
Logged

we art, web dev, and game dev
springhand
Casual Poster
*


heheheheheheheheh…

⛺︎ My Room

View Profile

First 1000 Members!Joined 2022!
« Reply #4 on: August 04, 2023 @581.05 »

@RodFireProductions This WORKED!!  :ozwomp:  :ozwomp:  :4u:  :4u: Thank you so much <3

@Melooon @Necrosia Thank you for the offer/suggestions! My intention was that I wanted to save everything as a folder on my PC and update everything right from there without having to manually use the Neocities interface... basically the supporter WebDAV feature without actually paying, haha. Unfortunately I'm not personally able to support Neocities yet ><. I have GitHub Desktop, which allows for mounting repositories on computers, and the GitHub web interface for editing files is more usable than most on mobile, which is pretty sweet. It's not that I chose Git *specifically* (what I have aren't so complex I can't do the version-controlling manually yet!), it's just what happens to be a part of what I need. I only need the GH desktop app for the mounting thing, which doesn't require Git to be installed anyway (a.k.a. I forgot to install it before installing GH desktop but nothing's breaking yet so all's fine... I guess? haha).
Logged
Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

I need help with neocities

Started by Kane VirkutisBoard ☔︎ ∙ I need Help!

Replies: 1
Views: 1861
Last post February 25, 2022 @609.50
by Melooon
Where are IPFS backups on Neocities? ANSWERED!

Started by ellievoyydBoard ✁ ∙ Web Crafting

Replies: 3
Views: 2259
Last post March 17, 2022 @162.86
by PAINTKILLER
Neocities on Polygon!

Started by MelooonBoard ☆ ∙ Showcase & Links

Replies: 9
Views: 2479
Last post June 18, 2023 @827.12
by Melooon

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi